{template 'common/header'} 
{template 'web/common'} 


<style type='text/css'>
	.clomn_span{
		width: 20%;
    height: 60px;
    margin: 0 20px;
    /*background: #ccc;*/
    line-height: 60px;
    overflow: hidden;	
    display: inline-block;
    font-size: 14px;
    font-weight: bold;
	}
</style>

<div class="main">
	<ul class="nav nav-tabs">
	    <li {if $operation=='display'}class="active"{/if}><a href="{php echo $this->createWebUrl('member',array('op'=>'display'))}">会员列表</a></li>
	    <li {if $operation=='statistics'}class="active"{/if}><a href="{php echo $this->createWebUrl('member',array('op'=>'statistics'))}">AB统计</a></li>
	</ul>
	
	{if $operation == 'statistics'}
		<div class="panel panel-default">
			<div class="panel-body table-responsive">
				<a href="{php echo $this->createWebUrl('member',array('op'=>'addAll_ceshi'))}" onclick="return confirm('确定要添加测试数据么？');return false;" class="btn btn-primary">添加测试数据</a>
				<a href="{php echo $this->createWebUrl('member',array('op'=>'deleteAll_ceshi'))}" onclick="return confirm('确定要清空测试数据么？');return false;" class="btn btn-danger">清空AB测试数据</a>
			</div>
		</div>
		<div class="panel panel-default">
		    <div class="panel-body table-responsive">
		    	{loop $list $row}
		        	<span class="clomn_span">{$row['name']}</span>
		    	{/loop}

    		</div>
        </div>
	{/if}

	{if $operation == 'display'}
		<form action="./index.php" method="get" class="form-horizontal" role="form" enctype="multipart/form-data">
		
			<div class='panel panel-default'>
				
				<div class="panel-heading">搜索</div>
				
				<div class="panel-body table-responsive">
					<input type="hidden" name="c" value="site" />
					<input type="hidden" name="a" value="entry" />
					<input type="hidden" name="do" value="member" />
					<input type="hidden" name="m" value="{php echo MODULE_NAME}" />
					<div class="form-group">
						<label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label">关键字</label>
						<div class="col-xs-12 col-sm-8 col-lg-9">
							<input class="form-control" name="keyword" id="" type="text" value="{$_GPC['keyword']}" placeholder="昵称、手机号、真实姓名">
						</div>
					</div>
					
					<div class="form-group">
						<label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label"></label>
						<div class=" col-xs-12 col-sm-2 col-lg-2">
							<button class="btn btn-default"><i class="fa fa-search"></i> 搜索</button>
						</div>
					</div>
					
					<div class="form-group"></div>
				
				</div>
			</div>
		
		</form>
		
		
		<div class="panel panel-default">
		
			<div class="panel-body">
				总人数：<span style="color:red;">{$totalall} 人</span>	
			</div>
		
		</div>
		
		<div class="panel panel-default">
		    <div class="panel-body table-responsive">
		        <table class="table table-hover">
		            <thead class="navbar-inner">
		                <tr>
		                    <th width="6%">级别</th>
		                    <th width="8%">会员UID</th>					
		                    <th width="8%">会员昵称</th>
		                    <th width="8%">真实姓名</th>
		                    <th width="8%">积分</th>
		                    <th width="8%">余额</th>
		                    <th width="12%">手机号码</th>
		                    <th width="10%">创建时间</th>
		                    <th width="8%">海报统计</th>					
		                </tr>
		            </thead>
		            <tbody>
		                {loop $list $row}
		                <tr>
		                    <td>{$row['level']}级</td>
		                    <td>{$row['uid']}</td>
		                    <td>
	                    		<img src="{$row['avatar']}" width="30">
		                    	{if !empty($row['nickname'])}{$row['nickname']}{else}{$row['m_nickname']}{/if}
		                    </td>
		                    <td>
	                    		{if !empty($member['realname'])}	
	                    			{$row['realname']}
	                    		{else}
	                    			未填写
	                    		{/if}
		                    </td>
		                    <td>{$row['credit1']}</td>
		                    <td>{$row['credit2']}</td>
		                    <td>
		                    	<label class="label label-info">
		                    		{if !empty($member['mobile'])}
		                    			{$member['mobile']}
		                    		{else}
		                    			暂无	
		                    		{/if}
		                    	</label>
		                    </td>
		                    <td>
		                    	{php echo date('Y-m-d',$row['createtime'])}
		                    	<br />
		                    	{php echo date('H:i:s',$row['createtime'])}
		                    </td>
		                    <td>{$row['posternum']} 张</td>
		                </tr>
		                {/loop} 
		                <tr>
		                    <td colspan='8'></td>
		                </tr>
		            </tbody>
		        </table>
		        {$pager}
		    </div>
		</div>
	{/if}

</div>


<script>
	
</script>

{template 'common/footer'}